using System;
using System.Collections.Generic;
using System.Text;

using DeviceManager.Common;

namespace DeviceManager.Device
{
    public enum ATMPlatform
    {
        KAL,
        NCR,
        Unknown // Exception
    }

    [LoggingClient.Trace]
    public class ATMPlatformSetting
    {

        // We read platform setting when application starts.
        private static string platform = string.Empty;
        public static ATMPlatform GetATMPlatform()
        {
            if (string.IsNullOrEmpty(platform))
            {
                platform = ATMCommon.ATMConfig.ATMConfigImpl.Instance.Platform;
            }

            if(platform.Equals( "KAL", StringComparison.OrdinalIgnoreCase))
            {
                return ATMPlatform.KAL;
            }
            else if (platform.Equals("NCR", StringComparison.OrdinalIgnoreCase))
            {
                return ATMPlatform.NCR;
            }
            else
            {
                return ATMPlatform.Unknown;
            }
        }
    }
}
